package crs.logger.model;

import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import crs.users.model.Users;

	/**
	 * CrsAccesolog generated by hbm2java
	 */
	@Entity
	@Table(name = "crs_accesolog", schema = "public")
	public class CrsAccesolog implements java.io.Serializable {

		private int logid;
		private Users users;
		private Date diahora;

		public CrsAccesolog() {
		}

		public CrsAccesolog(Users users, Date diahora) {
			this.users = users;
			this.diahora = diahora;
		}

		@Id
		@Column(name = "logid", unique = true, nullable = false)
		public int getLogid() {
			return this.logid;
		}

		public void setLogid(int logid) {
			this.logid = logid;
		}

		@ManyToOne(fetch = FetchType.LAZY)
		@JoinColumn(name = "userid", nullable = false)
		public Users getUsers() {
			return this.users;
		}

		public void setUsers(Users users) {
			this.users = users;
		}

		@Temporal(TemporalType.TIMESTAMP)
		@Column(name = "diahora", nullable = false, length = 29)
		public Date getDiahora() {
			return this.diahora;
		}

		public void setDiahora(Date diahora) {
			this.diahora = diahora;
		}

}
